package com.yjd.comm.user.service;

import com.yjd.comm.base.service.IBaseService;
import com.yjd.comm.enums.CreditDataRefTableEnum;
import com.yjd.comm.user.model.UserDataModel;

import java.util.Map;

/**
 * <b>description</b>：用户信息业务接口<br>
 * <b>time</b>：2017-06-27 08:59:19 <br>
 * <b>author</b>：  yangchangyan@yijiedai.com
 */
public interface IUserDataService extends IBaseService {
	/**
	 * 插入
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public UserDataModel insert(UserDataModel model) throws Exception;

	/**
	 * 更新,大于等于1表示成功，其他失败
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public int update(UserDataModel model) throws Exception;

	/**
	 * 根据user_id更新,大于等于1表示成功，其他失败
	 *
	 * @param paramMap
	 * @return
	 * @throws Exception
	 */
	public int updateByMap(Long user_id, Map<Object, Object> paramMap) throws Exception;

	/**
	 * 根据id删除,大于等于1表示成功，其他失败
	 * 
	 * @param user_id
	 * @return
	 * @throws Exception
	 */
	public int delete(long user_id) throws Exception;



	public int updateByMap(Map<Object,Object> param)throws Exception;


	/**
	 * 用户信用额度增加
	 * @throws Exception
	 */
	public void recoveryCredit(UserDataModel userDataModel,Long ref_id,Double loan_price,CreditDataRefTableEnum creditDataRefTableEnum,Long currtime)throws Exception;


	/**
	 * 判断用户的工作信息，联系人信息是否完整
	 * 0：不完整，1：部分完整，2：完整
	 *
	 * @param user_id
	 * @return
	 * @throws Exception
	 */
	public int isUserInfoCompleted(long user_id) throws Exception;
}
